import request from '@/utils/axios/axios-service.ts'
//数据详情consoleHeader
export const consoleHeader = (params) => request.get('/v1/chart',{params:params})
export const consoleShopOrder = (params: any) => request.get('/v1/chart', {params: params})
export const consoleStoreOrder = (params: any) => request.get('/v1/chart', {params: params})
// export const consoleHeader = () => request.get('/dashboard/console/header')
// export const consoleShopOrder = (params: any) => request.get('/dashboard/console/shop_order', {params: params})
// export const consoleStoreOrder = (params: any) => request.get('/dashboard/console/store_order', {params: params})

/**
 * 统计信息 - 区域用户数据
 */
export const statisticUserCharts = (params: any) => request.get('/statistic/user/charts', {params: params})
export const statisticUserRegion = (params: any) => request.get('/statistic/user/region', {params: params})

export const statisticStoreOrderCharts = (params: any) => request.get('/statistic/store_order/charts', {params: params})

export interface ConsoleHeader {
  title: string;
  date: string;
  today: number;
  yesterday: number;
  ratio: number;
  footer_label: string;
  footer_value: string;
}

export interface ShopSalesData {
  name: string;
  amount: number;
}

export type AxisData = { x: string; y: number };
export type ChartsSeriesData = { name: string; value: number, value2?: number, percent?: number };

export interface TopSearchData {
  id: number;
  keyword: string; //搜索关键词
  userNum: number; //用户数
  range: number; //涨幅
  status: number; //状态
}

export interface SalesProportionData {
  name: string;
  value: number;
}
